#include "myLight.h"

int SetupActiveLightsWorld(defLight lightIn[MaxLight], Light lightOut[MaxLight]){
	printf("SetupActiveLightsWorld\n");
	Light l;
	int n = 0;
	for(int i=0;i<MaxLight;i++){
		if(lightIn[i].active){
			l.col = lightIn[i].col;
			l.pos = lightIn[i].pos;
			lightOut[i] = l;
			n++;
		}

	}
	return n;
}

int SetupActiveLightsLocal(defLight lightIn[MaxLight], Light lightOut[MaxLight], _mat4 &WorldInv){
	printf("SetupActiveLightsLocal\n");
	Light l;
	int n = 0;
	for(int i=0;i<MaxLight;i++){
		if(lightIn[i].active){

			l.col = lightIn[i].col;
			l.pos = lightIn[i].pos;
			l.pos.mul(WorldInv,l.pos);
			lightOut[i] = l;
			n++;
		}

	}
	return n;
}
